home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / comm / mail / YAMscripts.lha / RandomSample.rexx < prev    next >
OS/2 REXX Batch file  |  1997-05-29  |  1KB  |  27 lines

  1. /* Plays a random sample whenever mail is received
  2. **  1. Copy the script to YAM:Rexx
  3. **  2. Set YAM settings for 'New mail reporting' to external program
  4. **  3. Enter 'sys:rexxc/rx >nil: yam:rexx/RandomSample.rexx' to the string gadget
  5. **
  6. ** If you have any problems, mail me at knikulai@utu.fi
  7. **
  8. ** Check http://www.utu.fi/~knikulai/ARexx.html for other scripts
  9. */
  10.  
  11. player='c:play16'                       /* Change here the sample player you use */
  12.         
  13. samples=9                               /* Change here the correct number of samples */
  14. file.1='sys:prefs/MasterIhaveMail.wav'  /* Enter each sample on own line */
  15. file.2='sys:prefs/Mail12.wav'           /* You can add as many samples as you want */
  16. file.3='sys:prefs/Mail13.wav'           /* ... well, actually at most 1000 samples */
  17. file.4='sys:prefs/mail14.wav'
  18. file.5='sys:prefs/mail10.wav'
  19. file.6='sys:prefs/mail9.wav'
  20. file.7='sys:prefs/mail8.wav'
  21. file.8='sys:prefs/mail7.wav'
  22. file.9='sys:prefs/mail5.wav'
  23.  
  24. samplenum=random(1,samples,time(s))
  25.  
  26. address command player file.samplenum
  27.